<form class="post-tr" id="uabc45282" onSubmit="return false">
  <div class="separator"></div><div class="separator"></div>
  <div class="sh">头像：</div>
  <div class="sp"><div id='userPic_v'></div><a onclick="openFileWin('callFun=ed_pic');" href="javascript::;">更换</a></div>
  
  <div class="separator"></div><div class="separator"></div>
  <div class="sh">账号：</div>
  <div class="sp"><?php e_h($data['name'])?> (<?php e_h($gD['name'])?>)</div>
  <div class="sh">邮箱：</div>
  <div class="sp"><?php e_h($data['email'])?> &nbsp; <a href="?u=cuser\my-femail">解绑</a></div>
  
  <div class="separator"></div><div class="separator"></div>
  <div class="sh">称呼：</div>
  <div class="sp"><input value="<?php e_h($data['compellation'])?>" class="edit"  name="compellation" /></div>
  <div class="sh">性别：</div>
  <div class="sp"><?php html::radioName('name="sex" class="edit"', lang::Ag(array('boy','gril')), $data['sex'])?></div>
  
  
  
  
</form>

<script>
function ed_pic(d){
  var v=encodeURIComponent(d[0].path);
  setLoading('userPic_v');
  $.post('?u=cuser\\my-fepic', 'v='+v, function(r){if(checAjaxRe(r)){
	  $('#userPic_v').html('<img width="120" src="?u=cimg\\b&f='+ v +'" />');
  }});
}
function upuserinfo(){
  $.post('?u=cuser\\my-fed', 'n='+ this.name + '&v='+  encodeURIComponent(this.value),  checAjaxRe);
}

$('#uabc45282 .edit').each(function(){
	var i=$(this);
	switch(this.type){
	  case 'radio':
	  	i.bind('focus', upuserinfo);
		break;
	  default:
	    i.bind('blur', upuserinfo);
		i.keypress(function(e){
			if(e.keyCode == 13)i.blur();
			else if(e.keyCode == 27){
			  i.unbind('blur', upuserinfo).blur().bind('blur', upuserinfo);
			}
		});
	}
});
</script>